<?php if (!defined('THINK_PATH')) exit();?><!-- public:header 以下内容 -->
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>网站后台管理中心- Powered by 74cms.com</title>
	<link rel="shortcut icon" href="<?php echo C('qscms_site_dir');?>favicon.ico"/>
	<meta name="author" content="骑士CMS" />
	<meta name="copyright" content="74cms.com" />
	<!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">  -->
	<link href="__ADMINPUBLIC__/css/common.css?v=<?php echo strtotime('today');?>" rel="stylesheet" type="text/css">
	<script src="__ADMINPUBLIC__/js/jquery.min.js"></script>
	<script src="__ADMINPUBLIC__/js/jquery.highlight-3.js"></script>
	<script src="__ADMINPUBLIC__/js/jquery.vtip-min.js"></script>
	<script src="__ADMINPUBLIC__/js/jquery.modal.dialog.js"></script>
	<script type="text/javascript" src="__ADMINPUBLIC__/js/laydate/laydate.js"></script>
	<!--[if lt IE 9]>
	<script type="text/javascript" src="__ADMINPUBLIC__/js/PIE.js"></script>
	<script type="text/javascript">
		(function ($) {
			$.pie = function (name, v) {
				// 如果没有加载 PIE 则直接终止
				if (!PIE) return false;
				// 是否 jQuery 对象或者选择器名称
				var obj = typeof name == 'object' ? name : $(name);
				// 指定运行插件的 IE 浏览器版本
				var version = 9;
				// 未指定则默认使用 ie10 以下全兼容模式
				if (typeof v != 'number' && v < 9) {
					version = v;
				}
				// 可对指定的多个 jQuery 对象进行样式兼容
				if ($.browser.msie && obj.size() > 0) {
					if ($.browser.version * 1 <= version * 1) {
						obj.each(function () {
							PIE.attach(this);
						});
					}
				}
			}
		})(jQuery);
		if ($.browser.msie) {
			$.pie('.pie_about');
		};
	</script>
	<![endif]-->
	<script src="__ADMINPUBLIC__/js/jquery.disappear.tooltip.js"></script>
	<script src="__ADMINPUBLIC__/js/common.js"></script>
	<script>
		var URL = '/index.php/admin/company',
			SELF = '/index.php?m=admin&amp;c=company&amp;a=edit_company&amp;uid=1&amp;_k_v=1',
			ROOT_PATH = '/index.php/admin',
			APP	 =	 '/index.php';

		var qscms = {
			district_level : "<?php echo C('qscms_category_district_level');?>",
			default_district : "<?php echo C('qscms_default_district');?>"
		};
	</script>
	<?php echo ($synsitegroupunbindmobile); ?>
	<?php echo ($synsitegroupregister); ?>
	<?php echo ($synsitegroupedit); ?>
	<?php echo ($synsitegroup); ?>
</head>
<body>

<!-- public:header 以上内容 -->
<?php if(empty($menu_title)): ?><div class="allpagetop">后台管理中心<strong>/</strong>首页</div>
	<?php else: ?>
	<div class="allpagetop"><?php echo ($menu_title); ?><strong>/</strong><?php echo ($sub_menu_title); ?></div><?php endif; ?>
<div class="mains">
	<div class="h1tit">
		<div class="h1">
            <?php if($sub_menu['pageheader']): echo ($sub_menu["pageheader"]); ?>
                <?php else: ?>
                <!--欢迎登录 <?php echo C('qscms_site_name');?> 管理中心！--><?php endif; ?>
        </div>
        <?php if(!empty($sub_menu['menu'])): ?><div class="topnav">
                <?php if(is_array($sub_menu['menu'])): $i = 0; $__LIST__ = $sub_menu['menu'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><a href="<?php echo U($val['module_name'].'/'.$val['controller_name'].'/'.$val['action_name']); echo ($val["data"]); if($isget and $_GET): echo get_first(); endif; if($_GET['_k_v']): ?>&_k_v=<?php echo (_I($_GET['_k_v'])); endif; ?>" class="<?php echo ($val["class"]); ?>"><?php echo ($val["name"]); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
                <div class="clear"></div>
            </div><?php endif; ?>
		<div class="clear"></div>
	</div>
<div class="toptit">
    编辑会员 (用户名：<span style="color:#0066CC"><?php echo ($company_user["username"]); ?></span>)
</div>
<div class="form_main width120">
    <div class="fl">注册时间:</div>
    <div class="fr txt"><?php echo (date("Y-m-d H:i",$company_user["reg_time"])); ?></div>
    <div class="fl">注册IP:</div>
    <div class="fr txt"><?php echo (($company_user["reg_ip"] != "")?($company_user["reg_ip"]):'- - - -'); ?></div>
    <div class="fl">注册地:</div>
    <div class="fr txt"><?php echo (($company_user["reg_address"] != "")?($company_user["reg_address"]):'- - - -'); ?></div>
    <div class="fl">最后登录时间:</div>
    <div class="fr txt"><?php echo (date("Y-m-d H:i",$company_user["last_login_time"])); ?></div>
    <div class="fl">最后登录IP:</div>
    <div class="fr txt"><?php if($company_user['last_login_ip']): echo ($company_user["last_login_ip"]); else: ?>- - - -<?php endif; ?></div>
    <div class="fl">添加方式:</div>
    <div class="fr txt">
        <?php if($company_user['robot'] == '0'): ?>人工注册<?php endif; ?>
        <?php if($company_user['robot'] == '1'): ?>采集<?php endif; ?>
    </div>
    <div class="clear"></div>
</div>

<div class="toptit link_blue">基本信息</div>
<form action="<?php echo U('edit_member');?>" method="post" name="FormData" id="FormData" >
    <div class="form_main width120">
        <div class="fl">用户名:</div>
        <div class="fr">
            <input name="username" type="text" class="input_text_default middle" maxlength="16" value="<?php echo ($company_user["username"]); ?>"/>
        </div>
        <div class="fl">手机:</div>
        <div class="fr">
            <input name="mobile" type="text" class="input_text_default middle" maxlength="11" value="<?php echo ($company_user["mobile"]); ?>" onKeyUp="if(event.keyCode !=37 && event.keyCode != 39) value=value.replace(/\D/g,'');"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/\D/g,''))"/>
        </div>
        <div class="fl">邮箱:</div>
        <div class="fr">
            <input name="email" type="text" class="input_text_default middle" maxlength="50" value="<?php echo ($company_user["email"]); ?>"/>
        </div>
        <div class="fl">QQ绑定:</div>
        <div class="fr txt">
            <?php if($company_user['qq_openid'] == 1): ?><input name="qq_openid" type="hidden" value="<?php echo ($company_user['qq_openid']); ?>">
                已绑定QQ账号<label><input type="checkbox" name="qq_openid" value="2"/>取消绑定</label>
            <?php else: ?>
                未绑定QQ帐号<?php endif; ?>
        </div>
        <div class="fl"></div>
        <div class="fr">
            <input type="hidden" name="uid"  value="<?php echo ($company_user["uid"]); ?>" />
            <input type="hidden" name="_k_v" value="<?php echo (_I($_GET['_k_v'])); ?>">
            <input type="submit" class="admin_submit" value="保存"/>
            <input type="button" class="admin_submit" value="返回" onClick="history.go(-1)"/>
        </div>
        <div class="clear"></div>
    </div>
</form>

<div class="toptit">修改密码</div>
<form action="<?php echo U('edit_member');?>" method="post">
    <div class="form_main width120">
        <div class="fl">新密码:</div>
        <div class="fr">
            <input name="password" type="password" class="input_text_default middle" maxlength="50" value=""/>
        </div>
        <div class="fl"></div>
        <div class="fr">
            <input type="hidden" name="uid"  value="<?php echo ($company_user["uid"]); ?>" />
            <input type="hidden" name="_k_v" value="<?php echo (_I($_GET['_k_v'])); ?>">
            <input type="submit" class="admin_submit" value="保存"/>
            <input type="button" class="admin_submit" value="返回" onClick="history.go(-1)"/>
        </div>
        <div class="clear"></div>
    </div>
</form>

<div class="toptit">用户状态</div>
<form action="<?php echo U('edit_member');?>" method="post">
    <div class="form_main width120">
        <div class="fl">帐号状态:</div>
        <div class="fr">
            <div data-code="2,1" class="imgchecked_small <?php if(($company_user["status"]) == "1"): ?>select<?php endif; ?>"><input name="status" type="hidden" value="<?php echo ($company_user['status']); ?>" /></div>
            <div class="clear"></div>
        </div>
        <div class="fl"></div>
        <div class="fr">
            <input type="hidden" name="uid"  value="<?php echo ($company_user["uid"]); ?>" />
            <input type="hidden" name="_k_v" value="<?php echo (_I($_GET['_k_v'])); ?>">
            <input type="submit" class="admin_submit" value="保存"/>
            <input type="button" class="admin_submit" value="返回" onClick="history.go(-1)"/>
        </div>
        <div class="clear"></div>
    </div>
</form>
<?php if($info != ''): ?><form id="form_com">
    <div class="toptit link_blue">
        企业资料
    </div>
    <div class="form_main width120">
        <div class="fl">营业执照:</div>
        <div class="fr txt link_blue">
            <?php if($info['certificate_img']): ?><a href="<?php echo attach($info['certificate_img'],'certificate_img');?>" target="_blank" title="点击查看"> 已上传</a>
            <?php else: ?>
                未上传<?php endif; ?>
        </div>
		
		<style>
			
		</style>
		 <div class="fl">企业logo:</div>
		 <div class="fr" style="position:relative;height:120px">
			<div class="logo_wrap pos_rel">
				<div class="logo">
					<?php if($info['logo']): ?><img id="logo_res" width="120" height="120" src="<?php echo attach($info['logo'],'company_logo');?>?<?php echo time();?>">
					<?php else: ?>
					<img id="logo_res" width="120" height="120" src="<?php echo attach('no_logo.png','resource');?>"><?php endif; ?>
				</div>
				<div class="logo_upload" id="hidden_file" name="company_logo">
					<div class="upimg"><div class="up">上传logo</div><div class="uptip">要求：请用JPG,GIF 尺寸：120*120</div></div>
				</div>
			</div>
		</div>
		 <div class="clear"></div>
        <div class="fl">认证状态:</div>
        <div class="fr">
            <div class="imgradio">
                <input name="audit" type="hidden" value="<?php echo ($info['audit']); ?>">
                <div class="radio <?php if(($info["audit"]) == "1"): ?>select<?php endif; ?>" data="1">认证通过</div>
                <div class="radio <?php if(($info["audit"]) == "2"): ?>select<?php endif; ?>" data="2">等待认证</div>
                <div class="radio <?php if(($info["audit"]) == "3"): ?>select<?php endif; ?>" data="3">认证未通过</div>
                <div class="radio <?php if(($info["audit"]) == "0"): ?>select<?php endif; ?>" data="0">未认证</div>
                <div class="clear"></div>
            </div>
        </div>
        <div class="fl"><span style="color:#FF3300; font-weight:bold">*</span> 公司名称:</div>
        <div class="fr">
            <input name="companyname" type="text" class="input_text_default" maxlength="30" value="<?php echo ($info["companyname"]); ?>"/>
        </div>
        <div class="fl">公司简称:</div>
        <div class="fr">
            <input name="short_name" type="text" class="input_text_default" maxlength="30" value="<?php echo ($info["short_name"]); ?>"/>
        </div>
        <div class="fl"><span style="color:#FF3300; font-weight:bold">*</span> 企业性质:</div>
        <div class="fr">
            <div class="imgradio J_company_nature">
                <input name="nature" type="hidden" value="<?php echo ($info['nature']); ?>">
                <input name="nature_cn" type="hidden" value="<?php echo ($info["nature_cn"]); ?>" id="nature_cn"/>
                <?php if(is_array($category['QS_company_type'])): $i = 0; $__LIST__ = $category['QS_company_type'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$nature): $mod = ($i % 2 );++$i;?><div class="radio <?php if(($info["nature"]) == $key): ?>select<?php endif; ?>" data="<?php echo ($key); ?>" title="<?php echo ($nature); ?>"><?php echo ($nature); ?></div><?php endforeach; endif; else: echo "" ;endif; ?>
                <div class="clear"></div>
            </div>
        </div>
        <div class="fl"><span style="color:#FF3300; font-weight:bold">*</span> 所属行业:</div>
        <div class="fr">
            <input name="trade_cn" id="trade_cn" type="text" class="input_text_default arrow J_resuletitle_trade" value="<?php echo (($info['trade_cn'] != "")?($info['trade_cn']):'请选择所属行业'); ?>" readonly="readonly" data-title="请选择所属行业" data-multiple="false" data-maxnum="0" data-width="682"/>
            <input class="J_resultcode_trade" name="trade" id="trade" type="hidden" value="<?php echo ($info['trade']); ?>" />
        </div>
        <div class="fl"><span style="color:#FF3300; font-weight:bold">*</span> 所在地区:</div>
        <div class="fr">
            <input name="category_cn" id="district_cn" type="text" class="input_text_default arrow J_resuletitle_city" value="<?php echo (($info['district_cn'] != "")?($info['district_cn']):'请选择工作地区'); ?>" readonly="readonly" data-toggle="funCityModal" data-title="请选择地区" data-multiple="false" data-maximum="0" data-width="760"/>
            <input class="J_resultcode_city" name="district" id="district" type="hidden" value="<?php echo ($info['district']); ?>" keep="<?php echo ($info['district']); ?>" />
        </div>
        <div class="fl"><span style="color:#FF3300; font-weight:bold">*</span> 公司规模:</div>
        <div class="fr">
            <div class="imgradio J_company_scale">
                <input name="scale" type="hidden" value="<?php echo ($info['scale']); ?>">
                <input name="scale_cn" type="hidden" value="<?php echo ($info["scale_cn"]); ?>" id="scale_cn"/>
                <?php if(is_array($category['QS_scale'])): $i = 0; $__LIST__ = $category['QS_scale'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$scale): $mod = ($i % 2 );++$i;?><div class="radio <?php if(($info["scale"]) == $key): ?>select<?php endif; ?>" data="<?php echo ($key); ?>" title="<?php echo ($scale); ?>"><?php echo ($scale); ?></div><?php endforeach; endif; else: echo "" ;endif; ?>
                <div class="clear"></div>
            </div>
        </div>
        <div class="fl">注册资金:</div>
        <div class="fr">
            <div style="float: left;">
                <input name="registered" type="text" class="input_text_default" maxlength="5" value="<?php echo ($info['registered']); ?>" style="width: 100px;" onKeyUp="if(event.keyCode !=37 && event.keyCode != 39) value=value.replace(/\D/g,'');"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/\D/g,''))"/> 万
            </div>
            <div class="imgradio" style="float: left; margin-left: 20px;">
                <input name="currency" type="hidden" value="<?php echo (($info['currency'] != "")?($info['currency']):'万人民币'); ?>">
                <div class="radio <?php if(($info["currency"]) != "万美元"): ?>select<?php endif; ?>" data="万人民币" title="万人民币">人民币</div>
                <div class="radio <?php if(($info["currency"]) == "万美元"): ?>select<?php endif; ?>" data="万美元" title="万美元">美元</div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="fl">企业福利:</div>
        <div class="fr">
            <input name="tag_cn" id="tag_cn" type="text" class="input_text_default arrow J_resuletitle_jobtag" value="<?php echo (($tagStr['cn'] != "")?($tagStr['cn']):'请选择企业福利'); ?>" readonly="readonly" data-title="请选择企业福利" data-multiple="true" data-maxnum="6" data-width="582"/>
            <input class="J_resultcode_jobtag" name="tag" id="tag" type="hidden" value="<?php echo ($tagStr['id']); ?>" />
        </div>
        <div class="fl"><span style="color:#FF3300; font-weight:bold">*</span> 联 系 人:</div>
        <div class="fr">
            <input name="contact" type="text" class="input_text_default middle" maxlength="15" value="<?php echo ($info["contact"]); ?>"/>
            <label><input name="contact_show" type="checkbox" value="1" <?php if(($info['contact_show'] == 1) or ($info['contact_show'] == '')): ?>checked="checked"<?php endif; ?> />对外公开</label>
        </div>
        <div class="fl"><span style="color:#FF3300; font-weight:bold">*</span> 联系电话:</div>
        <div class="fr">
            <input name="telephone" type="text" class="input_text_default middle" maxlength="11" value="<?php echo ($info["telephone"]); ?>" onKeyUp="if(event.keyCode !=37 && event.keyCode != 39) value=value.replace(/\D/g,'');"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/\D/g,''))"/>
            <label><input name="telephone_show" type="checkbox" value="1" <?php if(($info['telephone_show'] == 1) or ($info['telephone_show'] == '')): ?>checked="checked"<?php endif; ?> />对外公开</label>
        </div>
        <div class="fl">&nbsp;</div>
        <div class="fr">
            <input name="landline_tel_first" type="text" class="input_text_default" maxlength="4" value="<?php echo ($info['landline_tel_first']); ?>" style="width: 70px;" onKeyUp="if(event.keyCode !=37 && event.keyCode != 39) value=value.replace(/\D/g,'');"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/\D/g,''))"/> -
            <input name="landline_tel_next" type="text" class="input_text_default" maxlength="11" value="<?php echo ($info['landline_tel_next']); ?>" style="width: 207px;" onKeyUp="if(event.keyCode !=37 && event.keyCode != 39) value=value.replace(/\D/g,'');"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/\D/g,''))"/> -
            <input name="landline_tel_last" type="text" class="input_text_default" maxlength="6" value="<?php echo ($info['landline_tel_last']); ?>" style="width: 70px;" onKeyUp="if(event.keyCode !=37 && event.keyCode != 39) value=value.replace(/\D/g,'');"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/\D/g,''))"/>
            <label><input name="landline_tel_show" type="checkbox" value="1" <?php if(($info['landline_tel_show'] == 1) or ($info['landline_tel_show'] == '')): ?>checked="checked"<?php endif; ?> />对外公开</label>
        </div>
        <div class="fl"><span style="color:#FF3300; font-weight:bold">*</span> 联系邮箱:</div>
        <div class="fr">
            <input name="email" type="text" class="input_text_default middle" maxlength="50" value="<?php echo ($info["email"]); ?>"/>
            <label><input name="email_show" type="checkbox" value="1" <?php if(($info['email_show'] == 1) or ($info['email_show'] == '')): ?>checked="checked"<?php endif; ?>/>对外公开</label>
        </div>
        <div class="fl">公司网址:</div>
        <div class="fr">
            <input name="website" type="text" class="input_text_default middle" maxlength="80" value="<?php echo ($info["website"]); ?>"/>
        </div>
        <div class="fl"><span style="color:#FF3300; font-weight:bold">*</span> 联系地址:</div>
        <div class="fr">
            <input name="address" type="text" class="input_text_default middle" maxlength="50" value="<?php echo ($info["address"]); ?>"/>
        </div>
        <div class="fl">公司简介:</div>
        <div class="fr">
            <input name="short_desc" type="text" class="input_text_default" maxlength="120" value="<?php echo ($info["short_desc"]); ?>"/>
        </div>
        <div class="fl"><span style="color:#FF3300; font-weight:bold">*</span> 公司介绍:</div>
        <div class="fr">
            <textarea id="contents" name="contents" class="input_text_default" style="line-height:200%; height:150px;" onpropertychange="if(this.value.length&gt;2000){this.value=this.value.slice(0,2000)}"><?php echo ($info["contents"]); ?></textarea>
            <div style="color: #999999; padding-top: 10px;">请将字数控制在2000字以内。</div>
        </div>
        <div class="fl">企业模版:</div>
        <div class="fr">
            <input name="tpl" type="text" class="input_text_default middle" maxlength="16" value="<?php echo ($company_user["tpl"]); ?>"/>
        </div>
        <div class="fl"></div>
        <div class="fr">
            <input type="hidden" name="id"  value="<?php echo ($info["id"]); ?>" />
            <input type="hidden" name="uid"  value="<?php echo ($company_user["uid"]); ?>" />
            <input type="hidden" name="_k_v" value="<?php echo (_I($_GET['_k_v'])); ?>">
            <input type="button" class="admin_submit" value="保存修改" id="J_submit_com"/>
            <input type="button" class="admin_submit" value="返回" onClick="history.go(-1)"/>
        </div>
        <div class="clear"></div>
    </div>
</form><?php endif; ?>
</div>
<!-- public:footer 以下内容 -->
<div class="footer link_blue">
    Powered by <a href="https://www.74cms.com" target="_blank"><span style="color:#009900">74</span><span
        style="color: #FF3300">cms</span></a> v<?php echo C('QSCMS_VERSION');?>
</div>
<div class="layui-floatmenu">
    <div class="J_suggest item" data-url="<?php echo U('Suggest/add');?>"></div>
    <div class="J_suggestList list item" data-url="<?php echo U('Suggest/index');?>">
      <?php if($suggest): ?><span></span><?php endif; ?>
    </div>
  </div>
<script src="__ADMINPUBLIC__/js/layui.js"></script>
<!-- public:footer 以上内容 -->
<script>
  layui.use(['form', 'element'], function(){
  var element = layui.element;
  var form = layui.form;
  var layer = layui.layer;
  var $ = layui.jquery;
  var loading = layer.load(0, {shade: [0.3,'#fff'],time:500});
  $('.J_suggest').click(function(){
    var url = $(this).data('url');
    $.getJSON(url,function(result){
      layer.open({
          title:'反馈',
          type: 1,
          area: ['800px', 'auto'], //宽高
          content: result.data
      });
    });
  });
  $('.J_suggestList').click(function(){
    var url = $(this).data('url');
    var f = $(this).find('span');
    $.getJSON(url,function(result){
      layer.open({
          title:'历史反馈记录',
          type: 1,
          area: ['800px', '690px'], //宽高
          content: result.data
      });
      f.remove();
    });
  });
});
</script>
<?php $tag_load_class = new \Common\qscmstag\loadTag(array('type'=>'category','search'=>'1','cache'=>'0','列表名'=>'list',));$list = $tag_load_class->category();?>
<script type="text/javascript">
  var uploadUrl = "<?php echo U('Upload/index');?>";
</script>
<link href="__ADMINPUBLIC__/css/company_logo.css" rel="stylesheet" type="text/css" />
<script src="__ADMINPUBLIC__/js/ajaxfileupload.js"></script>
<script src="__ADMINPUBLIC__/js/fileupload.js"></script>
<script type="text/javascript" src="../public/js/jquery.user.city.js"></script>
<script type="text/javascript" src="../public/js/jquery.modal.userselectlayer.js"></script>
</body>
<script type="text/javascript">
var comid = "<?php echo ($info['id']); ?>";
		$.upload("#hidden_file",{company_id:comid,dir:'company_logo'},function(result){
		
			$("#logo_res").attr("src",result.url.path);
			if(result.error==1){
				disapperTooltip('success',result.message);
			}else{
				disapperTooltip('success',result.message);
			}
			//$('.clear_logo').show();
		});
    $(document).ready(function () {
        $('#J_submit_com').click(function(){
            var that = $(this);
            if(that.hasClass('disabled')){
                return false;
            }
            that.val('正在保存...').addClass('disabled');
            $.post("<?php echo U('Company/edit_company');?>",$('#form_com').serialize(),function(result){
                if(result.status==1){
                    disapperTooltip("success", result.msg,function(){
                        location.reload();
                    });
                }else{
                    disapperTooltip("remind", result.msg,function(){
                        that.val('保存修改').removeClass('disabled');
                    });
                    return false;
                }
            },'json');
        });
        // 公司性质cn
        $(".J_company_nature .radio").live('click',function(){
            $("#nature_cn").val($(this).attr("title"));
        });
        // 公司规模cn
        $(".J_company_scale .radio").live('click',function(){
            $("#scale_cn").val($(this).attr("title"));
        });
    });
</script>
</html>